<template>
  <div class="home">
    <StarryBackground />
    <div class="content">
      <h1 class="title">
        <span class="highlight">AI</span> 智能助手
        <div class="subtitle">您的智能生活伙伴</div>
      </h1>
      
      <div class="app-list">
        <div class="app-card" @click="$router.push('/love-master')">
          <div class="card-content">
            <div class="icon-wrapper">
              <el-icon class="chat-icon"><ChatDotRound /></el-icon>
            </div>
            <h2>AI 恋爱大师</h2>
            <p>你的专属恋爱顾问，为你解答情感困惑</p>
            <div class="start-btn">
              立即开始
              <el-icon class="arrow-icon"><ArrowRight /></el-icon>
            </div>
          </div>
        </div>

        <div class="app-card" @click="$router.push('/super-agent')">
          <div class="card-content">
            <div class="icon-wrapper">
              <el-icon class="monitor-icon"><Monitor /></el-icon>
            </div>
            <h2>AI 超级智能体</h2>
            <p>全能AI助手，帮你解决各种问题</p>
            <div class="start-btn">
              立即开始
              <el-icon class="arrow-icon"><ArrowRight /></el-icon>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ChatDotRound, Monitor, ArrowRight } from '@element-plus/icons-vue'
import StarryBackground from '../components/StarryBackground.vue'
</script>

<style scoped>
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.content {
  max-width: 1200px;
  width: 100%;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.title {
  text-align: center;
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 60px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.highlight {
  color: #409EFF;
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(64, 158, 255, 0.3);
  border-radius: 3px;
}

.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
  font-weight: normal;
}

.app-list {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.app-card {
  width: 300px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-content {
  padding: 30px;
  text-align: center;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

.chat-icon {
  font-size: 40px;
  color: #FF6B6B;
}

.monitor-icon {
  font-size: 40px;
  color: #4CAF50;
}

.app-card:hover .icon-wrapper {
  transform: scale(1.1);
}

h2 {
  color: #ffffff;
  margin: 20px 0;
  font-size: 1.8rem;
}

p {
  color: rgba(255, 255, 255, 0.8);
  margin: 15px 0 25px;
  font-size: 1rem;
  line-height: 1.6;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #409EFF;
  font-size: 1.1rem;
  padding: 10px 24px;
  border-radius: 30px;
  background: rgba(64, 158, 255, 0.1);
  transition: all 0.3s ease;
}

.start-btn:hover {
  background: rgba(64, 158, 255, 0.2);
  transform: translateX(5px);
}

.arrow-icon {
  transition: transform 0.3s ease;
}

.start-btn:hover .arrow-icon {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }
  
  .app-card {
    width: 100%;
    max-width: 300px;
  }
}
</style>